package com.ldp.designpatterns.study.single.lazy;

/**
 * @ClassName LazyStaticSingle
 * @Description 懒汉式——静态内部类
 * @Author lindipei
 * @Date 2023/10/13 17:35
 */
public class LazyStaticSingle {
    /*private  static  LazyStaticSingle instance;
    private LazyStaticSingle(){}

    //写一个静态内部类，该类中，有一个静态属性
    private static class SingletonInstance {
        private static final LazyStaticSingle instance = new LazyStaticSingle();
    }

    //提供一个静态的公有方法，直接返回SingletonInstance.instance
    public static synchronized  LazyStaticSingle getInstance(){
        return SingletonInstance.instance;
    }*/
}
